define(function (){
    //轮胎寿命分析-轮胎寿命预测
    var tireLifeForecast=function($dataChart){
        $dataChart.highcharts({
            title: {
                text: '轮胎寿命预测'
            },
            xAxis: {
                categories: ['轮胎1','轮胎2','轮胎3','轮胎4','轮胎5','轮胎5'],
                lineWidth: 1,
                lineColor: '#808080'
            },
            credits: {
                enabled: false
            },
            yAxis: [{
                title: {
                    text: ''
                }
            },{
                min:0,
                title: {
                    useHTML:true,
                    text: ''
                },
                opposite: true
            }],
            tooltip: {
                shared: true,
                valueDecimals: 0
            },
            series: [
                {
                    name: '已用周期(万公里)',
                    type: 'column',
                    color: '#FF9A00',
                    data:  [1,2,3,4,5,6]
                },
                {
                    name: '预测周期(万公里)',
                    type: 'column',
                    color: '#74C4D4',
                    data: [11,12,13,14,15,16]
                }
            ]
        });
    };
    //轮胎寿命分析-保养次数
    var tireMaintainingTimes=function($dataChart){
        $dataChart.highcharts({
            title: {
                text: '轮胎寿命预测'
            },
            xAxis: {
                categories: ['轮胎1','轮胎2','轮胎3','轮胎4','轮胎5','轮胎5'],
                lineWidth: 1,
                lineColor: '#808080'
            },
            credits: {
                enabled: false
            },
            yAxis: [{
                title: {
                    text: ''
                }
            },{
                min:0,
                title: {
                    useHTML:true,
                    text: ''
                },
                opposite: true
            }],
            tooltip: {
                shared: true,
                valueDecimals: 0
            },
            series: [
                {
                    name: '已用周期(万公里)',
                    type: 'bar',
                    color: '#FF9A00',
                    data:  [1,2,3,4,5,6]
                },
                {
                    name: '预测周期(万公里)',
                    type: 'bar',
                    color: '#74C4D4',
                    data: [11,12,13,14,15,16]
                }
            ]
        });
    };
    //轮胎寿命分析-轮胎分析图
    var tireAnalyChart=function($dataChart){
        $dataChart.highcharts({
            title: {
                text: ''
            },
            xAxis: {
                categories: [],
                labels: {
                    align: 'center',
                    rotation: -45,
                    y: 50
                },
                lineWidth: 1,
                lineColor: '#808080'
            },
            credits: {
                enabled: false
            },
            yAxis: [{
                title: {
                    text: ''
                }
            },{
                min:0,
                title: {
                    useHTML:true,
                    text: ''
                },
                opposite: true
            }],
            tooltip: {
                shared: true,
                valueDecimals: 2
            },
            series: [

                {
                    name: '温度(C)',
                    color: '#D30000',
                    yAxis: 1,
                    data: [15,13,13,13,13,13,14,13,13,13]
                },
                {
                    name: '压力(Kpa)',
                    color: '#9CCF31',
                    yAxis: 1,
                    data: [250,150,150,250,251,250,150,250,150,250 ]
                },{
                    name: '里程(公里)',
                    color: '#9CCF31',
                    yAxis: 1,
                    data: [450,250,210,450,410,150,250,450,350,450]
                }
            ]
        });
    };
    return {
        tireLifeForecast: tireLifeForecast,
        tireMaintainingTimes:tireMaintainingTimes,
        tireAnalyChart:tireAnalyChart
    };
});